package com.heima.model.wemedia.dtos;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 文章图文统计-分页统计
 * @author yangkexuan
 * @className StatisticsPageDto
 * @date 2023/8/3 20:03
 * @description
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class StatisticsPageDto {
    private Integer page;
    private Integer size;
    private String beginDate;
    private String endDate;
    private Integer id;

    public void checkParam() {
        if (this.page == null || this.page < 0) {
            setPage(1);
        }
        if (this.size == null || this.size < 0 || this.size > 100) {
            setSize(10);
        }
    }
}
